All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.text.StyledEditorKit

java.lang.Object
   |
   +----com.sun.java.swing.text.EditorKit
           |
           +----com.sun.java.swing.text.DefaultEditorKit
                   |
                   +----com.sun.java.swing.text.StyledEditorKit

public class StyledEditorKit
extends DefaultEditorKit
This is the set of things needed by a text component to be a reasonably functioning editor for some type of text document. This implementation provides a default implementation which treats text as styled text and provides a minimal set of actions for editing styled text.


Constructor Index

 o StyledEditorKit()

Method Index

 o clone()
Create a copy of the editor kit.
 o createDefaultDocument()
Creates an uninitialized text storage model that is appropriate for this type of editor.
 o deinstall(JEditorPane)
Called when the kit is being removed from the JEditorPane.
 o getActions()
Fetches the command list for the editor.
 o getCharacterAttributeRun()
Fetches the element representing the current run of character attributes for the caret.
 o getInputAttributes()
Gets the input attributes for the pane.
 o getViewFactory()
Fetches a factory that is suitable for producing views of any models that are produced by this kit.
 o install(JEditorPane)
Called when the kit is being installed into a JEditorPane.

Constructors

 o StyledEditorKit
 public StyledEditorKit()

Methods

 o getInputAttributes
 public MutableAttributeSet getInputAttributes()
Gets the input attributes for the pane. When the caret moves and there is no selection, the input attributes are automatically mutated to reflect the character attributes of the current caret location. The styled editing actions use the input attributes to carry out their actions.

Returns:
the attribute set
 o getCharacterAttributeRun
 public Element getCharacterAttributeRun()
Fetches the element representing the current run of character attributes for the caret.

Returns:
the element
 o clone
 public Object clone()
Create a copy of the editor kit. This allows an implementation to serve as a prototype for others, so that they can be quickly created.

Returns:
the copy
Overrides:
clone in class DefaultEditorKit
 o getActions
 public Action[] getActions()
Fetches the command list for the editor. This is the list of commands supported by the superclass augmented by the collection of commands defined locally for style operations.

Returns:
the command list
Overrides:
getActions in class DefaultEditorKit
 o createDefaultDocument
 public Document createDefaultDocument()
Creates an uninitialized text storage model that is appropriate for this type of editor.

Returns:
the model
Overrides:
createDefaultDocument in class DefaultEditorKit
 o install
 public void install(JEditorPane c)
Called when the kit is being installed into a JEditorPane.

Parameters:
c - the JEditorPane
Overrides:
install in class EditorKit
 o deinstall
 public void deinstall(JEditorPane c)
Called when the kit is being removed from the JEditorPane. This is used to unregister any listeners that were attached.

Parameters:
c - the JEditorPane
Overrides:
deinstall in class EditorKit
 o getViewFactory
 public ViewFactory getViewFactory()
Fetches a factory that is suitable for producing views of any models that are produced by this kit. This is implemented to return View implementations for the following kinds of elements:

Returns:
the factory
Overrides:
getViewFactory in class DefaultEditorKit

All Packages  Class Hierarchy  This Package  Previous  Next  Index